#include "sterilization_config_data.h"

sterilization_config_data::sterilization_config_data()
{
}

sterilization_config_data::sterilization_config_data(
     int  msterilization_temperature,
     int  msterilization_time,
     int  mpulsing_times,
     int  mpulsing_lowest_pressure,
     int  mpulsing_highest_pressure,
     int  mprebalance_time,
     int  mdry_pressure,
     int  mdry_keep_time,
     int  mdry_times,
     int  mbottom_exhaust_temperature,
     int  mbottom_exhaust_time,
     int  mbottom_prebalance_time,
     int  mbottom_cold_exhaust_times
      )
{
    sterilization_temperature=msterilization_temperature;
    sterilization_time=msterilization_time;
    pulsing_times=mpulsing_times;
    pulsing_lowest_pressure=mpulsing_lowest_pressure;
    pulsing_highest_pressure=mpulsing_highest_pressure;
    prebalance_time=mprebalance_time;
    dry_pressure=mdry_pressure;
    dry_keep_time=mdry_keep_time;
    dry_times=mdry_times;
    bottom_exhaust_temperature=mbottom_exhaust_temperature;
    bottom_exhaust_time=mbottom_exhaust_time;
    bottom_prebalance_time=mbottom_prebalance_time;
    bottom_cold_exhaust_times=mbottom_cold_exhaust_times;

}
QDataStream & operator<<(QDataStream &datastream, const sterilization_config_data & data)
{
    return datastream
    << data.sterilization_temperature
    << data.sterilization_time
    << data.pulsing_times
    << data.pulsing_lowest_pressure
    << data.pulsing_highest_pressure
    << data.prebalance_time
    << data.dry_pressure
    << data.dry_keep_time
    << data.dry_times
    << data.bottom_exhaust_temperature
    << data.bottom_exhaust_time
    << data.bottom_prebalance_time
    << data.bottom_cold_exhaust_times;



}
QDataStream & operator>>(QDataStream &datastream, sterilization_config_data &data)
{
    int sterilization_temperature;
    int sterilization_time;
    int pulsing_times;
    int pulsing_lowest_pressure;
    int pulsing_highest_pressure;
    int prebalance_time;
    int dry_pressure;
    int dry_keep_time;
    int dry_times;
    int bottom_exhaust_temperature;
    int bottom_exhaust_time;
    int bottom_prebalance_time;
    int bottom_cold_exhaust_times;

     datastream >> sterilization_temperature
    >> sterilization_time
    >> pulsing_times
    >> pulsing_lowest_pressure
    >> pulsing_highest_pressure
    >> prebalance_time
    >> dry_pressure
    >> dry_keep_time
    >> dry_times
    >> bottom_exhaust_temperature
    >> bottom_exhaust_time
    >> bottom_prebalance_time
    >> bottom_cold_exhaust_times;

     data=  sterilization_config_data(sterilization_temperature,
      sterilization_time,
      pulsing_times,
      pulsing_lowest_pressure,
      pulsing_highest_pressure,
      prebalance_time,
      dry_pressure,
      dry_keep_time,
      dry_times,
      bottom_exhaust_temperature,
      bottom_exhaust_time,
      bottom_prebalance_time,
      bottom_cold_exhaust_times);

     return datastream;
}
